<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    let obj1 = { a: 1, b: [1, 2, 3] };
    let str = JSON.stringify(obj1);
    console.log(Object.prototype.toString.call(str));
    let obj2 = JSON.parse(str);
    console.log(Object.prototype.toString.call(obj2));

    console.log(obj2);

    obj1.a = 2;
    obj1.b.push(4);
    console.log(obj1);
    console.log(obj2);
  </script>
</html>
